package com.ojoin.trade.supplyloan_core.web.messagequeue;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ojoin.trade.common.web.service.impl.JedisMQServiceImpl;
import com.ojoin.trade.supplyloan_core.utils.catchdata.SLFixedThreadPool;

@Service
public class SubscriberStart implements Runnable{
	@Autowired 
	public JedisMQServiceImpl jedisMQ;
	   
	@Autowired 
	public SubscriberByObject jedisPubSub;
	
	// 初始化方法
	//@PostConstruct
	void init(){
		SLFixedThreadPool.elsePool.execute(this);
	} 
    
	@Override
	public void run() {
		 
		jedisMQ.subscriber(SubscriberByObject.CHANNEL, jedisPubSub); 
		
	} 
	

}
